@echo off
echo 测试完整的自动化流程集成
echo.

echo 1. 启动后端服务...
cd backend
start /B mvn spring-boot:run
cd ..

echo 等待服务启动...
timeout /t 10 /nobreak > nul

echo 2. 测试完整自动化流程...
curl -X POST http://localhost:8080/api/analysis/automation/full ^
  -H "Content-Type: application/json" ^
  -d "{\"username\":\"test\",\"password\":\"test\",\"deviceSn\":\"test123\",\"phone\":\"13800138000\"}"

echo.
echo 3. 测试处理已下载文件...
curl -X POST http://localhost:8080/api/analysis/process/downloaded ^
  -H "Content-Type: application/json" ^
  -d "{\"deviceSn\":\"test123\",\"phone\":\"13800138000\"}"

echo.
echo 测试完成！
pause
